#include <iostream>
using namespace std;
#define MAX_N 200005
int scores[MAX_N];

int main()
{   
    int n, m;
    cin >> n >> m;
    int k = n - m;
    int sum_score = 0;
    for(int i = 0, a; i < k; i++) 
    {
        cin >> a;
        sum_score += a;
    }
    double a = (sum_score + m) * 1.0 / n;
    double b = (sum_score * 1.0 + m * 5) / n;
    printf("%lf %lf", a, b);
    return 0;
}